package Model;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

public class HibernateUtils {
	private static final AnnotationConfiguration config =
			new AnnotationConfiguration()
				.addAnnotatedClass(Category.class)
				.addAnnotatedClass(Usuario.class)
				.addAnnotatedClass(Supplier.class)
				.addAnnotatedClass(Product.class)
				.addAnnotatedClass(Orden.class)
				.addAnnotatedClass(DetalleOrden.class)
				.configure("hibernate.cfg.xml");

	public static final SessionFactory SESSION_FACTORY = config.buildSessionFactory();
}
